<template>
	<view class="pay-success">
		<NavBar title="支付成功" :isBack="true"></NavBar>
		<view class="content">
			<view class="box">
				<image src="@/static/order/success.png"></image>
				<view class="title">支付成功</view>
				<view>再去逛逛吧</view>
				<view class="btn">
					<view @click="goHome">返回首页</view>
					<view @click="lookOrder">查看订单</view>
				</view>
			</view>
			<GoodsItem :daliyList="daliyList" title="可能你还喜欢" />
		</view>
	</view>
</template>

<script setup>
import GoodsItem from '@/pages/order/components/goodsItem'
import {
	reactive,
	toRefs
} from 'vue'
const state = reactive({
	daliyList: [{
		"id": 3,
		"cover": "https://ytsc.weibenh5.com/image/333.jpeg",
		"price": "128.88",
		"title": "永通车载新风净化器"
	},
	{
		"id": 4,
		"cover": "https://ytsc.weibenh5.com/image/333.jpeg",
		"price": "128.88",
		"title": "永通车载新风净化器"
	},
	{
		"id": 7,
		"cover": "https://ytsc.weibenh5.com/image/333.jpeg",
		"price": "128.88",
		"title": "永通车载新风净化器"
	},
	{
		"id": 8,
		"cover": "https://ytsc.weibenh5.com/image/333.jpeg",
		"price": "128.88",
		"title": "永通车载新风净化器"
	}
	]
})
function goHome () {
	uni.reLaunch({
		url: '/pages/index/index'
	})
}
function lookOrder () {
	uni.navigateTo({
		url: '/pages/order/order'
	})
}
const { daliyList } = toRefs(state)
</script>

<style lang="scss" scoped>
.pay-success {
	.content {
		padding: 36rpx;
		position: relative;
		top: -35rpx;

		.box {
			width: 678rpx;
			height: 454rpx;
			background: #FFFFFF;
			border-radius: 22rpx 22rpx 22rpx 22rpx;
			box-sizing: border-box;
			margin-bottom: 36rpx;
			padding: 80rpx 104rpx 58rpx;
			font-weight: 400;
			font-size: 24rpx;
			color: #666666;
			text-align: center;

			image {
				width: 100rpx;
				height: 100rpx;
			}

			.title {
				font-weight: bold;
				font-size: 32rpx;
				color: #333333;
				margin: 24rpx 0rpx 7rpx;
			}

			.btn {
				display: flex;
				justify-content: space-between;
				align-items: center;
				margin-top: 52rpx;

				view {
					width: 192rpx;
					height: 66rpx;
					line-height: 68rpx;
					background: #58DBCF;
					border-radius: 500rpx 500rpx 500rpx 500rpx;
					font-weight: 800;
					font-size: 30rpx;
					color: #FFFFFF;
					text-align: center;
				}
			}
		}
	}

}</style>